package com.zwr.sheller.core.common;

import java.util.HashMap;
import java.util.Map;

/**
 * @author 18032
 */
public class JsonResult {

    private final Map<String, Object> map = new HashMap<>();

    public void setCode(String code) {
        map.put("code", code);
    }

    public void setMsg(String msg) {
        map.put("msg", msg);
    }

    public void setField(String key, Object value) {
        map.put(key, value);
    }

    public void setAll(Map<String, Object> all) {
        map.putAll(all);
    }

    public Map<String, Object> getMap() {
        return map;
    }
}
